﻿@model ZDSoft.LMS.Domain.Role
@{
    ViewBag.Title = "Authorize";
    Layout = "~/Views/Shared/_Layout.cshtml";
    string xml = Server.HtmlDecode(@ViewBag.TreeXml);
}
<link rel="STYLESHEET" type="text/css" href="@Url.Content("~/Content/Style/dhtmlxtree.css")"/>
<script  src="@Url.Content("~/Scripts/dhtmlxcommon.js")" type="text/javascript" language="javascript"></script>
<script  src="@Url.Content("~/Scripts/dhtmlxtree.js")" type="text/javascript" language="javascript"></script>
<script language="javascript" type="text/javascript">
    var imgPath = '@Url.Content("~/Content/Images/csh_bluebooks/")';
    var tree;

    $(document).ready(function () {
        tree = new dhtmlXTreeObject("tree", "100%", "100%", 0);
        tree.setSkin('dhx_skyblue');
        tree.setImagePath(imgPath);
        tree.enableCheckBoxes(1);
        tree.enableThreeStateCheckboxes(true);
        var xmlPath = '@Url.Content("~/Content/XMLFile1.xml")'
        tree.loadXML(xmlPath);
    });
</script>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: White;"
    align="center">
    <tr>
        <td class="mbg">
            <table cellspacing="0" cellpadding="0" width="100%" border="0" valign="top">
                <tr>
                    <td>
                        <table style="height: 23px;" cellspacing="0" cellpadding="0" width="120" background="@Url.Content("~/Content/Images/m_17.gif")"
                            border="0">
                            <tr>
                                <td>
                                    <span class="contentPageTitle">&nbsp;&gt;&gt; 授权</span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="titleContentDivider" height="6">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<p>
    @Html.ActionLink("返回列表", "Index")
    
</p>
<table>
    <tr>
        <td valign="top">
            <div id="tree" style="width: 300px; height: 400px; border: 1px solid Silver; overflow: auto;">
            </div>
        </td>
        <td style="padding-left: 25" valign="top">
            <a href="javascript:void(0);" onclick="tree.setCheck(tree.getSelectedItemId(),true);">
                Check item</a> <a href="javascript:void(0);" onclick="tree.setCheck(tree.getSelectedItemId(),false);">
                    UnCheck item</a> <a href="javascript:void(0);" onclick="alert(tree.getAllChecked());">
                        Get list of checked</a>
        </td>
    </tr>
</table>
<p>
    <input type="submit" value="保存" class="btn3" />
</p>
